package com.yanfan.energybilling.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

@Data
public class EnergyCostStatisticsVo {

    private String name;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;

//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String times;

    private String serialNumber;

    private String deviceName;
    /*
     * 累计值
     * */
    private BigDecimal totalValue;

    private BigDecimal totalAmount;

    private String identity;

    //用量
    private BigDecimal differenceValue;

    //能源类型
    private Integer energyType;

    private String energyTypeStr;

    private Integer type;

    public EnergyCostStatisticsVo() {

    }
    public EnergyCostStatisticsVo(String identity, BigDecimal totalAmount, BigDecimal totalValue, String deviceName, String serialNumber, Date time, String name) {
        this.identity = identity;
        this.totalAmount = totalAmount;
        this.totalValue = totalValue;
        this.deviceName = deviceName;
        this.serialNumber = serialNumber;
        this.time = time;
        this.name = name;
    }
    public EnergyCostStatisticsVo(Date time, BigDecimal totalValue, BigDecimal totalAmount) {
        this.totalValue = totalValue;
        this.totalAmount = totalAmount;
        this.time = time;
    }
    // 在 EnergyCostStatisticsVo.java 中添加以下构造函数
    public EnergyCostStatisticsVo(Double totalValue, Timestamp time) {
        this.totalValue = new BigDecimal(totalValue);
        this.time = time;
    }
}
